/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Outputsdemo;

import java.io.File;

/**
 *
 * @author Administrator
 */
public class FlieMethods {
    public static void main(String[] args) {
        File fl=new File("c:\\temp","temp.txt");
        System.out.println("文件名"+fl.getName());
        System.out.println("路径"+fl.getPath());
        System.out.println("绝对路径"+fl.getAbsolutePath());
        System.out.println(fl.exists()?"文件存在":"文件不存在");
        System.out.println(fl.isDirectory()?"文件是目录":"文件不是目录");
    }

}
